package com.appspot.ldsdrawingtool.client.services;

import com.appspot.ldsdrawingtool.client.lds.components.LDSClientModel;
import com.appspot.ldsdrawingtool.client.services.stubs.LDSModelUpdaterServiceStub;
import com.appspot.ldsdrawingtool.client.services.stubs.LDSModelUpdaterServiceStubAsync;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;

public class LDSModelUpdaterService {
    // Create a remote service proxy to talk to the server-side service.
    private static final LDSModelUpdaterServiceStubAsync lmuService = GWT.create(LDSModelUpdaterServiceStub.class);

    /**
     * Loads the default LDS model
     */
    public static void loadDefaultLDSModel(AsyncCallback<LDSClientModel> callback) {
        lmuService.getDefaultLDSModel(callback);
    }

    /**
     * Sets an LDS model name
     */
    public static void setLDSModelName(String identifer, String text, AsyncCallback<String> callback) {
        lmuService.setLDSModelName(identifer, text, callback);
    }
    
}
